<template>
  <div class="row">
    <div class="col-sm-9" @click="getNewsDetails()">
      <h3>森屿暖树</h3>
      <p class="text-muted">huasen 发布于 2017-06-18</p>
      <p>森林覆盖的岛屿花开遍地，一切都将如此美好。谁在月下变成桂树，可以躲得过夜夜思念。现在你还在凤凰，在美景歇息的片刻，又是谁执意从你脑海中跑出来。</p>
      <router-link to="/details">查看详情</router-link>
      <p class="text-muted">阅读（401）赞（32）文艺/心灵/美好</p>
    </div>
    <div class="col-sm-3 hidden-xs new_icon">
      <a href="#"><img src="../assets/img/huasen.png" alt=""></a>
    </div>
  </div>
</template>

<script>
    export default {
        name: "NewsItem",
        methods: {
          getNewsDetails() {
            this.$router.push('/details');
          }
        },
        created() {
          console.log("组件以及被初始化")
        }
    }
</script>

<style scoped>
  .publish a img {
    display: block;
    max-width: 100%;
    margin-top: 20px;
  }
</style>
